package com.sxw.controller;

import com.sxw.utils.RedisUtils;
import com.sxw.web.BaseController;
import com.sxw.web.ReactiveRequestContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;
import reactor.core.publisher.MonoSink;

import java.util.function.Consumer;

@RestController
public class Demo extends BaseController {

    @Autowired
    RedisUtils redisUtils;

    @GetMapping("/test")
    public String test(){
        redisUtils.set("key","value");
        return "test";
//        startPage();
//        redisUtils.set("key","value");
//        return Mono.create(stringMonoSink -> stringMonoSink.success("test"));
    }
}
